package com.yugao.fintech.antelope.infra.dict.service.impl;

import com.yugao.fintech.antelope.infra.dict.service.DictItemService;
import com.yugao.fintech.antelope.infra.module.dict.DictItemApi;
import com.yugao.fintech.antelope.infra.module.dict.model.entity.DictItem;
import org.springframework.context.annotation.Primary;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;


@Primary
@Service
public class DictItemApiImpl implements DictItemApi {
    @Autowired
    private DictItemService dictItemService;

    @Override
    public Map<String, Map<String, DictItem>> listByCodes(List<String> codes) {
        return dictItemService.listByCodes(codes);
    }

    @Override
    public DictItem getDictItem(String dictType, String code) {
        return dictItemService.getDictItem(dictType, code);
    }

    @Override
    public List<DictItem> listDictItem(String dictCode) {
        return dictItemService.listByDictCode(dictCode);
    }
}
